Returns the X coordinate (horizontal pixel location) of the mouse pointer relative to the screen or a window or control.
Note: Only used at the application level when a window or control is not specified.
Syntax
GetMouseXCoordinate()
Supported objects
Browser, Button, Calendar, Cell, CheckBox, ColumnHeader, ComboBox, ContextMenu, Control, DateTimePicker, EditBox, Grid, HTMLElement, HTMLLink, HTMLTable, Image, Item, Label, Link, ListBox, ListView, Menu, NavigationField, PopupMenu, ProgressBar, RadioButton, Row, RowHeader, ScrollBar, Slider, SpinBox, SubItem, Tab, TabBar, ToolBar, Tree, Window
Return value
| Value | Description |
|---|---|
| Value | Mouse pointer X coordinate. When testing on a computer with multiple screens, the value is the total width of all screens. |
Example
'Returns X coordinate on screen where button is clicked
Window("Report a Bug").Button("Login").Click()
x = GetMouseXCoordinate()